<template>
    <div>
        <top-style v-if="third.name"
            ><span>{{ third.name }}</span></top-style
        >
        <div class="plate-style-list">
            <ul v-if="third.list">
                <li v-for="item in third.list" :key="item.id">
                    <router-link :to="{ name: 'detail', query: { id: item.id, title: item.title } }">
                        <div class="img-box">
                            <img :src="item?.cover" alt="" />
                        </div>
                        <div class="content-box">
                            <p class="book-name">{{ item.title }}</p>
                            <p class="author">{{ item.author }}</p>
                            <p class="book-detail">{{ item.content }}</p>
                        </div>
                    </router-link>
                </li>
            </ul>
            <ul v-else>
                <li>暂时无内容!!</li>
            </ul>
        </div>
    </div>
</template>

<script>
import TopStyle from "@/components/top-style.vue";
export default {
    props: ["third"],
    data() {
        return {};
    },
    components: {
        TopStyle,
    },
};
</script>

<style lang="scss" scoped>
.plate-style-list {
    width: 100%;
    ul {
        width: 100%;
        // height: 100px;
        a,
        li {
            // border: 1px solid #000;
            width: 100%;
            height: 100px;
            margin-bottom: 15px;
            display: flex;
            .img-box {
                width: 23%;
                height: 100%;
                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .content-box {
                padding-left: 8px;
                width: 77%;
                height: 100px;
                .book-name {
                    padding: 0px 0px 6px;
                    font-size: 13px;
                    font-weight: 500;
                    color: #000;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
                .author {
                    padding-bottom: 8px;
                    font-size: 12px;
                    color: #656565;
                }
                .book-detail {
                    height: 49px;
                    line-height: 17px;
                    font-size: 12px;
                    color: #999;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    // white-space: 3;
                    -webkit-line-clamp: 3;
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                }
            }
        }
    }
}
</style>
